#define  _CRT_SECURE_NO_WARNINGS 1
int sim_atoi(const char* str)
{
    int count = 0;
    const char* mov = str;
    while (*mov != '\0')
    {
        while (*mov >= 48 && *mov <= 57)
        {
            count++;
            mov++;

        }
        if (*mov != '\0')
            mov++;
    }

    int ret = 0;
    while (count)
    {
        ret += (*(mov - count) - '0') * pow(10, count - 1);
        count--;
    }
    return ret;
}